<template>
  <div>
    <div v-for="(value, key, index) in obj" :key="index">
      {{ value }}-------{{ key }}------{{ index }}
    </div>
    <div v-for="(item, index) in 10" :key="index">{{ item }}</div>
    <div v-once>{{ num }}</div>
    <button @click="num++">修改num</button>

    <div :class="'red'">123</div>
    <div :class="['red']">123</div>
    <div :class="{ red: true }">123</div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      obj: {
        name: '张三',
        age: 18
      },
      num: 1
    }
  }
}
</script>
<style>
.red {
  color: red;
}
</style>
